<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="<%=basePath%>js/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/vue.min.js"></script>
<link rel="stylesheet" href="<%=basePath%>css/layui/css/layui.css">
<script type="text/javascript"
	src="<%=basePath%>js/stockManage/editOutStockApply.js"></script>
<script type="text/javascript" src="<%=basePath%>js/BaseUtile.js"></script>

<title>填写入库申请</title>
</head>
<body style="margin: 3%">
	<input id="materialList" style="display: none" />

	<div style="text-align: center">
		<label style="font-size: 30px">填写出库申请</label>
	</div>
	<div>
		<div style="margin-top: 2%; width: 30%">
			<label class="layui-form-label">申请人</label>
			<div class="layui-input-block">
				<input value="${userInfo.nickname}" disabled="disabled" class="layui-input" />
			</div>
		</div>
		<hr class="layui-bg-orange">
		<!-- 左边选择库存商品 -->
		<div style="width: 25%; float: left;">
			<div style="font-size: 25px; text-align: center;">库存</div>
			<div class="layui-input-inline">
				<div style="float: left; width: 70%; margin-top: 1%">
					<input id="inputSearchWords" class="layui-input"
						placeholder="输入商品名称/编码" />
				</div>
				<div style="float: left;; width: 30%">
					<button id="searchStockButton" class="layui-btn layui-btn-fluid">搜索</button>
				</div>
			</div>
			<div id="stockMaterialDiv">
				<table class="layui-table" lay-skin="line">
					<thead>
						<tr>
							<th style="text-align: center;">商品</th>
							<th style="text-align: center;">库存</th>
							<th style="text-align: center;">单位</th>
						</tr>
					</thead>
					<tr v-for="(item ,index) in items" v-if="item.quantity>0"
						v-on:click="chooseQuantity(item,index)">
						<th style="text-align: center;">{{item.material.materialName}}</th>
						<th style="text-align: center;">{{item.quantity}}</th>
						<th style="text-align: center;">{{item.material.unit.unitName}}</th>
					</tr>

				</table>

			</div>

		</div>
		<div id="outStockApplyMaterialDiv"
			style="width: 70%; float: left; margin-left: 5%">
			<div style="font-size: 25px; text-align: center;">出库商品</div>
			<table class="layui-table">
				<thead>
					<tr>
						<th>序号</th>
						<th>名称</th>
						<th>数量</th>
						<th>单位</th>
						<th>操作</th>
					</tr>
				</thead>
				<tr v-for="(item ,index) in items">
					<th>{{index+1}}</th>
					<th>{{item.materialName}}</th>
					<th>{{item.materialQuantity}}</th>
					<th>{{item.unitName}}</th>
					<th><button v-on:click="deleteIt(item,index)"
							class="layui-btn layui-btn-sm">删除</button></th>
				</tr>
			</table>

		</div>

		<div style="clear: both">
			<label class="layui-form-label">备注:</label>
			<textarea id="inputRemark" placeholder="请输入备注" class="layui-textarea"></textarea>
		</div>


	</div>















	<script type="text/javascript" src="<%=basePath%>css/layui/layui.js"></script>
	<script>
		layui.use('form', function() {

		});
	</script>
</body>
</html>